package com.etc.entity;

import java.io.Serializable;
import java.text.SimpleDateFormat;

import com.etc.util.UUIDHexGenerator;

/**
 * @Author 泽浩
 * @Date 2019年4月29日上午10:25:27
 */
public class Orders implements Serializable {
    private static final long serialVersionUID = 8292369033952195397L;
    private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
    private Integer orderId;
    private String orderNo;
    private User user;
    private Double orderPrice;
    private Integer orderStatus;
    private Integer attId;
    private String orderDate;

    public Orders() {
        super();
    }

    /**
     * @param orderId
     * @param user
     * @param orderPrice
     * @param orderStatus
     * @param attId
     */
    public Orders(Integer orderId, User user, Double orderPrice, Integer orderStatus, Integer attId) {
        super();
        this.orderId = orderId;
        this.orderNo = new UUIDHexGenerator().generate();
        this.user = user;
        this.orderPrice = orderPrice;
        this.orderStatus = orderStatus;
        this.attId = attId;
    }

    @Override
    public String toString() {
        return "Orders{" +
                "orderId=" + orderId +
                ", orderNo='" + orderNo + '\'' +
                ", user=" + user +
                ", orderPrice=" + orderPrice +
                ", orderStatus=" + orderStatus +
                ", attId=" + attId +
                ", orderDate='" + orderDate + '\'' +
                '}';
    }

    public static SimpleDateFormat getSdf() {
        return sdf;
    }

    public static void setSdf(SimpleDateFormat sdf) {
        Orders.sdf = sdf;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Double getOrderPrice() {
        return orderPrice;
    }

    public void setOrderPrice(Double orderPrice) {
        this.orderPrice = orderPrice;
    }

    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    public Integer getAttId() {
        return attId;
    }

    public void setAttId(Integer attId) {
        this.attId = attId;
    }

    public String getOrderDate() {
        return orderDate;
    }

    public void setOrderDate(String orderDate) {
        this.orderDate = orderDate;
    }
}